home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Design
/
WB Collection.iso
/
workbench werkzeuge
/
bildschirmschoner
/
bserver_v1.5
/
sources.lha
/
Sources
/
include
/
server.h
< prev
Wrap
C/C++ Source or Header
|
1995-11-08
|
4KB
|
175 lines
/*
* Server.h 1.5
* Copyright © 1995 by Stefano Reksten of 3AM - The Three Amigos!!!
* All rights reserved.
*
* DON'T FOOL WITH THIS FILE! It's BServer private only. Modifying
* anything could bring to unpredictable results. Moreover your
* programs would not be compatible with future releases of this
* program. :-)
*
*/
#ifndef SERVER_H
#define SERVER_H
#define PROGRAMNAME "BServer"
#define PROGRAMVERSION "1.5"
#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif
#ifndef EXEC_PORTS_H
#include <exec/ports.h>
#endif
#ifndef EXEC_INTERRUPTS_H
#include <exec/interrupts.h>
#endif
#ifndef GRAPHICS_DISPLAYINFO_H
#include <graphics/displayinfo.h>
#endif
/* Server status */
#define MUST_RETRY 0
#define MUST_BLANK 1
#define IDLE 2
#define BLANKING 3
/* Client actions */
#define ACTION_IDLE 0
#define ACTION_ARRIVED 1
#define ACTION_LEAVING 2 /* removed, use ACTION_FAILED */
#define ACTION_FAILED 3
/* Server commands */
#define COMMAND_IDLE 0
#define COMMAND_QUIT 1
#define PROGRAMNAME "BServer"
#define PROGRAMVERSION "1.5"
#define SERVERPORTNAME PROGRAMNAME"Port"
/*=========================================================*/
/*=== ClientMessage =======================================*/
/*=========================================================*/
struct ClientMessage {
struct Message cm_Msg;
struct DisplayIDInformation *DInfo;
ULONG cm_Action;
};
/*=========================================================*/
/*=== ServerMessage =======================================*/
/*=========================================================*/
struct ServerMessage {
struct Message sm_Msg;
ULONG sm_Command;
APTR sm_Data;
};
/*=========================================================*/
/*=== ClientNode ==========================================*/
/*=========================================================*/
#define CLIENTNAME_MAXLENGTH 50
#define PROGNAME_MAXLENGTH 150
#define ARGS_MAXLENGTH 1024
struct ClientNode {
struct Node cn_Node;
char cn_ClientName[CLIENTNAME_MAXLENGTH];
char cn_ClientProg[PROGNAME_MAXLENGTH];
char cn_ClientArgs[ARGS_MAXLENGTH];
};
/*=========================================================*/
/*=== ModeNode ============================================*/
/*=========================================================*/
struct ModeNode
{
struct Node mn_Node;
UWORD mn_Index;
ULONG mn_DisplayID;
char mn_Name[DISPLAYNAMELEN];
};
/*=========================================================*/
/*=== DisplayIDInformation ================================*/
/*=========================================================*/
struct DisplayIDInformation
{
struct DisplayInfo di_DisplayInfo;
struct DimensionInfo di_DimensionInfo;
struct MonitorInfo di_MonitorInfo;
UBYTE di_Brightness;
UBYTE di_Volume;
STRPTR di_Args;
};
/*=========================================================*/
/*=== Gadgets IDs =========================================*/
/*=========================================================*/
#define TIMEOUT_GDG 0
#define CHANGETIME_GDG 1
#define RANDOM_GDG 2
#define ACTIVE_GDG 3
#define HIDE_GDG 4
#define QUIT_GDG 5
#define BLANK_GDG 6
#define KILL_GDG 7
#define LIST_GDG 8
#define MODEID_GDG 9
#define ADDCLIENTS_GDG 10
#define CLIENTARGS_GDG 11
#define BRILEVEL_GDG 12
#define SNDLEVEL_GDG 13
#define MENUID_ABOUT 1
#define MENUID_HIDE 2
#define MENUID_QUIT 3
#define MENUID_RAWMOUSE 4
#define MENUID_DISK 5
/*=========================================================*/
/*=== HotKey events =======================================*/
/*=========================================================*/
#define EVT_HOTKEY 1L
#define EVT_BLANKKEY 2L
/*=====================================================*/
/*=== SVX and Module structures =======================*/
/*=====================================================*/
typedef struct {
UBYTE Volume;
ULONG Period;
ULONG DataLength;
BYTE *AudioData;
/* REALLY private */
struct IOAudio *AudioIO;
} Sound;
typedef struct {
APTR m_Data;
/* REALLY private */
struct Interrupt m_Int;
BOOL m_IntInstalled;
} Module;
#endif